package chenji.gunapi.untl;

import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;

import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.TextComponent;

public class Tellraw {
	public static void send(Player p, ItemStack i, String s) {
		TextComponent TextAccept = new TextComponent("☞[接受]☜");
		TextAccept.setColor(ChatColor.GREEN);
		TextAccept.setBold(true);
		TextAccept.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/tpaok " + p.getName().toLowerCase()));
		TextAccept.setHoverEvent(
				new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("点击接受对方的传送请求").create()));
		
		p.sendMessage(" ");
		p.sendMessage("§3[东方大陆]  §7>>>  §6玩家 §a" + p.getName() + " §6申请传送到你这里。");
		p.spigot().sendMessage(TextAccept);
		p.sendMessage(" ");

	
	}
}

